<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/8/14
  Time: 9:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <center>
        <h1>正在给${gb.gname}班级分配教室<br>

        </h1>
        <form action="<c:url value='/updateGradeRoom.do'/>" method="post">
            <input type="hidden" name="gid" value="${gb.gid}"/>
            教室：<select name="rid">
                    <option value="-1">--请选择--</option>
                    <c:forEach var="r" items="${list}">
                        <option ${r.gb!=null?'disabled':''}  value="${r.rid}" ${r.rid==gb.rb.rid?'selected':''}>${r.raddress}
                            <c:if test="${r.gb!=null}">该教室已经被${r.gb.gname}班级占用了</c:if>
                        </option>
                    </c:forEach>
                 </select>
            <input type="submit" value="提交"/>
        </form>
    </center>
</body>
</html>
